<?php

if ( !defined( 'BASEPATH' ) ) exit( 'No direct script access allowed' );

/**
 * 注销控制器
 */
class Logout extends MY_Controller
{

    /**
     * 注销
     */
    public function index()
    {
        $this->session->unsetUserSession();

        $data = array( );

        //提示注册成功
        $messageData = array(
            'title' => '注销成功',
            'message' => '4秒后自动跳转回首页',
            'autoRedirect' => true,
            'autoRedirectTimeOut' => 4,
            'autoRedirectURL' => config_item( 'base_url' ),
        );
        $messageBox = Modules::run( 'messageBox', $messageData );
        $data['logoutData'] = $messageBox;

        $this->get_common_section( $data );
        $this->load->view( 'logout', $data );
    }

}